package com.android.cl.coludtf.model;

public class Result<T> {

    private String code;
    private String message;
    private T data;
    private String token;

    public Result success(String message, T data, String token) {
        Result result = new Result();
        result.setCode("200");
        result.setMessage(message);
        result.setToken(token);
        return result;
    }

    public Result fail(String message) {
        Result result = new Result();
        result.setCode("500");
        result.setMessage(message);
        return result;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

}
